package cn.achao.csr.api;

import cn.achao.csr.api.factory.AliLoginFallbackFactory;
import cn.achao.csr.api.model.resp.AliLoginResp;
import cn.achao.csr.base.constant.SecurityConstants;
import cn.achao.csr.base.resp.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @Author: achao
 **/
@FeignClient(contextId = "csrZfbLoginContextId", path = "/zfb", value = "csr-zfb", fallbackFactory = AliLoginFallbackFactory.class)
public interface AliLoginApi {

    @GetMapping("/zfbLogin")
    R<AliLoginResp> zfbLogin(@RequestParam("status") String status,
                             @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
}
